<template>
  <div>
    <h1>{{ msg }}</h1>
  </div>
</template>

<script>
export default {
  data() {
    return {
      msg: "Hello, 70",
    };
  },

  beforeCreate() {
    console.log(this.msg);
    console.log("我是beforeCreate,我被触发了");
  },
  //注意,通常我们在created中发送请求拿回数据,因为此时才能存在变量上
  created() {
    console.log(this.msg);

    console.log("我是created,我被触发了");
  },
};
</script>

<style>
</style>